Video processing method, video processing device, and storage medium

ABSTRACT

A video processing method, a video processing device, and a storage medium are provided. The video processing method includes: determining target image frames corresponding to a dynamic special effect in a video and determining an attribute of a special effect element corresponding to the dynamic special effect in each of the target image frames and coordinates of the special effect element. The video processing method also includes: rendering the special effect element on a drawing interface based on the attribute and the coordinates of the special effect element; filling the target image frames into the drawing interface as a background and forming drawing interface frames with the dynamic special effect; and outputting the drawing interface frames corresponding to each of the target image frames.

RELATED APPLICATION

This application claims priority to PCT Application No.PCT/CN2017/106102, filed on Oct. 13, 2017, which claim priority toChinese Patent Application No. 201610903697.2, filed on Oct. 17, 2016.The two applications are incorporated herein by reference in theirentirety.

FIELD OF THE TECHNOLOGY

The present disclosure relates to the field of video technologies, andparticularly, to a video processing method, a video processing device,and a related storage medium.

BACKGROUND OF THE DISCLOSURE

With development of the Internet industry, especially mobile access tothe Internet, sharing a video through the Internet is widely recognizedas a new form of information exchange.

For example, in a mobile application, a user may record a video by usinga mobile terminal such as a mobile phone. The user may share the videoon a social network platform. Other users of the social network platformmay view the video shared by the first user and provide comments,communicate, and share the video again by using an interactive functionof the social network platform, sometimes with enhanced visual effectsin the videos.

In the above example, when a user is recording a video or needs to sharea video over the Internet, to emphasize or express a certain clip or acertain object in the video, the user usually needs to add a specialeffect to a corresponding clip or over the object to attract theattention of viewers. However, relevant technologies only supportcreating a simple graphic layer on each frame of image of a video, toachieve an effect of a graffiti, for example, in a video.

FIG. 1 is a schematic view of a display effect of making text graffition a frame of image in a video. The effect of making a graffiti by usingletters “LALA” can be realized on one frame of image or at least twocontinuous frames of images in a video. However, when drawing a graphiclayer on at least two frames of images in a video, a viewer may not knowthe clip or object of the video that a presenter intended to highlightif the viewer does not view the video from the beginning.

SUMMARY

In order to resolve the forgoing problem, embodiments of the presentinvention provide a video processing method, a video processing device,and a storage medium that can enhance an identification degree of a clipor a recorded object in a video.

A technical solution according to embodiments of the present disclosureis implemented as follows.

According to a first aspect, an embodiment of the present disclosureprovides a video processing method. The video processing methodincludes: determining, by a computing device, target image framescorresponding to a dynamic special effect in a video and determining anattribute of a special effect element corresponding to the dynamicspecial effect in each of the target image frames and coordinates of thespecial effect element. The video processing method also includes:rendering, by the computing device, the special effect element on adrawing interface based on the attribute and the coordinates of thespecial effect element; filling, by the computing device, the targetimage frames into the drawing interface as a background and formingdrawing interface frames with the dynamic special effect; and outputtingthe drawing interface frames corresponding to each of the target imageframes.

According to a second aspect, an embodiment of the present disclosureprovides a video processing device. The video processing deviceincludes: a memory and a processor coupled to the memory. The processoris configured to determine target image frames corresponding to adynamic special effect in a video; and determine an attribute of aspecial effect element corresponding to the dynamic special effect ineach of the target image frames and coordinates of the special effectelement. The processor is also configured to render on a drawinginterface based on the attribute and the coordinates of the specialeffect element to create the special effect element; a synthesizingportion, fill the target image frames into the drawing interface as abackground of the drawing interface and creating drawing interfaceframes with the dynamic special effect; and output the drawing interfaceframes corresponding to each of the target image frames.

According to another aspect, an embodiment of the present disclosureprovides a storage medium storing computer program instructionsexecutable by at least one processor to perform the video processingmethod provided in one embodiment of the present disclosure. Thecomputer program instructions can cause the at least one processor toperform: determining target image frames corresponding to a dynamicspecial effect in a video and determining an attribute of a specialeffect element corresponding to the dynamic special effect in each ofthe target image frames and coordinates of the special effect element.The computer program instructions also cause the at least one processorto perform: rendering the special effect element on a drawing interfacebased on the attribute and the coordinates of the special effectelement; filling the target image frames into the drawing interface as abackground and forming drawing interface frames with the dynamic specialeffect; and outputting the drawing interface frames corresponding toeach of the target image frames.

Embodiments consistent with the present disclosure provide a method fordetermining target video frames for which a dynamic special effect needsto be formed in a video; determining a video frame corresponding to aclip or a specific object in a video as a target video frame.Embodiments of the present disclosure thereby provides a way tocustomize a dynamic special effect in the video upon demand.

For the audience of a video, regardless of a time point of a video atwhich the video is being viewed, since the eye-catching duration of adynamic special effect is far longer than a static effect formed by agraphic layer drawn in the video, embodiments of the present disclosureenhance users ability to identify a clip or object that needs to behighlighted by the video presenter, which improves user experience ofvideo sharing.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic view of implementation of a special effect in avideo consistent with embodiments of the present disclosure;

FIG. 2 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure;

FIG. 3 is a schematic flowchart of a video processing method that isimplemented at a user side and a network side cooperatively according toan embodiment of the present disclosure;

FIG. 4 is a schematic view of a software and hardware structure of avideo processing device according to an embodiment of the presentdisclosure;

FIG. 5A is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure;

FIG. 5B is a schematic view of image frames that are mapped to a videoin different stages of a dynamic special effect according to anembodiment of the present disclosure;

FIG. 5C is a schematic view of drawing a special effect element for atarget image frame and a mapped dynamic special effect of acorresponding stage according to an embodiment of the presentdisclosure;

FIG. 5D is a schematic view of synthesizing a target image frame and adrawing interface on which a special effect element is drawn accordingto an embodiment of the present disclosure;

FIG. 6 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure;

FIG. 7 is a schematic flowchart of a video processing method accordingto an embodiment of the present disclosure;

FIG. 8A is a schematic view of displaying a light painting specialeffect according to an embodiment of the present disclosure;

FIG. 8B is a schematic view of displaying a light painting specialeffect according to an embodiment of the present disclosure;

FIG. 8C is a schematic view of displaying a light painting specialeffect according to an embodiment of the present disclosure;

FIG. 8D is a schematic view of displaying a light painting specialeffect according to an embodiment of the present disclosure;

FIG. 8E is a schematic view of displaying a light painting specialeffect according to an embodiment of the present disclosure;

FIG. 8F is a schematic view of displaying a light painting specialeffect according to an embodiment of the present disclosure;

FIG. 8G is a schematic view of displaying a light painting specialeffect according to an embodiment of the present disclosure;

FIG. 8H is a schematic view of displaying a light painting specialeffect according to an embodiment of the present disclosure;

FIG. 8I is a schematic view of processing of drawing a special effectelement based on a particle system according to an embodiment of thepresent disclosure;

FIG. 8J is a schematic flowchart of forming a light painting specialeffect in an input video according to an embodiment of the presentdisclosure; and

FIG. 9 is a schematic structural diagram of a video processing deviceaccording an embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

The following describes the present disclosure in detail with referenceto the accompanying drawings and the embodiments. It should beunderstood that the embodiments provided therein are not intended tolimit the present disclosure, but only intended to interpret the presentdisclosure. In addition, the described embodiments are some of theembodiments for implementing the present disclosure rather than all ofthe embodiments for implementing the present disclosure. All otherembodiments obtained by recombining the technical solutions of theembodiments by a person skilled in the art without creative efforts andother embodiments based on the implementation of the present disclosureshall fall within the protection scope of the present disclosure.

It should be noted that the terms “include”, “comprise”, and anyvariants thereof in the embodiments of the present disclosure areintended to cover a non-exclusive inclusion. Therefore, a method or adevice that includes a series of elements not only includes suchelements that are disclosed expressly, but also includes other elementsnot specified expressly, or may include inherent elements of theimplementation method and device. Unless otherwise specified, an elementlimited by “include a/an . . . ” does not exclude other relevantelements existing in the method or device including the element. Forexample, steps in a method or parts in a device, the parts herein may bea part of a circuit, a part of a processor, and a part of program orsoftware, and may also be a unit that may be modularized ornon-modularized.

For example, a video processing method according to an embodiment of thepresent disclosure may include a series of steps. However, the videoprocessing method according to an embodiment of the present disclosureis not limited to steps disclosed therein. Likewise, a video processingdevice according to an embodiment of the present disclosure includes aseries of parts. However, the video processing method according to anembodiment of the present disclosure is not limited to parts expresslydisclosed therein and may also include parts configured to obtainrelevant information or perform processing based on information.

Before embodiments of the present disclosure are described in detail,nouns and terms involved in the embodiments of the present disclosureare explained, and the nouns and terms involved in the embodiments ofthe present disclosure are applicable to the following explanations.

Dynamic special effect refers to a dynamic visual effect added to avideo. A dynamic special effect may be a light painting special effectin the present disclosure. That is, a dynamic visual effect with aspecific attribute drawn in a video by moving an optical source. Forexample, a trace of moving the optical source or various patterns formedby the optical source.

Special effect element is a basic visual unit constituting a dynamicspecial effect. For example, when a light painting special effect isformed by using a particle system such as a MAYA particle system or a 3DMAX particle system, a basic unit constituting a light painting specialeffect is also referred to as a particle.

An attribute is used to describe a manner for constructing and forming adynamic special effect by a special effect element, for example,describing a dynamic special effect by a size, color, a quantity or by aspeed, an acceleration speed, and a life cycle.

An image frame is a basic unit forming a video. One image frame is astatic image. Continuously collected image frames are rendered to form adynamic visual effect.

Visual effects refer to when a dynamic special effect is added to avideo. The dynamic special effect is carried by a series of image frames(also referred to as target image frames) in the video, the dynamicspecial effect may be decomposed into a series of static visual effectsfor the target image frames. A series of continuous static visualeffects constitute an effect of dynamic changes having a special effect.A visual effect is corresponding to a target image frame. The visualeffect of the target image frame may be further decomposed intopositions and attributes of the special effect element on the targetimage frames.

A drawing interface is also referred to as a canvas for presenting anddynamically displaying a special effect element and graphic elements inan image frame. Usually, graphic elements are presented and displayed ona drawing interface by using a scripting language (usually JavaScript).

FIG. 2 is a schematic view of architecture of a video processing methodaccording to an embodiment of the present disclosure. The videoprocessing method includes: step 101: determining target image framescorresponding to a to-be-added dynamic special effect in a video; step102: determining an attribute of a special effect element correspondingto the dynamic special effect in each of the target image frames and apair of coordinates of the special effect element; step 103: renderingthe special effect element on a drawing interface based on the attributeand the coordinates of the special effect element; step 104: filling thetarget image frames into the drawing interface as a background of thedrawing interface and forming drawing interface frames with the dynamicspecial effect; and step 105: outputting the drawing interface framesthat are formed correspondingly for each of the target image frames.

An embodiment of the present disclosure further provides a videoprocessing device for implementing the video processing method, and thevideo processing device may be implemented by using various manners, andwill be described as follows.

For example, the video processing device may be implemented by aterminal at a user side (such as a smartphone and a tablet PC) andhardware resources in a server at a network side cooperatively.Referring to a schematic flowchart of the video processing method shownin FIG. 3, the video processing device in FIG. 3 is distributed andimplemented in the terminal at the user side and the server at thenetwork side, and the terminal at the user side and the server at thenetwork side may communicate in various manners, for example, cellularcommunications based on communications modes such as Code DivisionMultiple Access (CDMA) and Wideband Code Division Multiple Access(WCDMA) and evolved modes thereof, and communications based on WirelessFidelity (Wi-Fi).

In FIG. 3, the terminal at the user side and the server at the networkside perform data interaction through established communications toimplement steps 101 to 105 shown in FIG. 2. Steps performed by theterminal and the server are not limited in the embodiments of thepresent disclosure and may be adjusted flexibly according to userrequirements. In addition, usually, the terminal at the user side maycollect a video.

Furthermore, for example, the video processing device may be implementedby a hardware resource of the terminal at the user side. That is, thevideo processing device may be implemented in the terminal at the userside. The terminal at the user side may perform steps 101-105 shown inFIG. 2.

Furthermore, for example, the video processing device may be implementedby a hardware resource in the server at the network side. That is, thevideo processing device may be implemented in the server at the networkside. The server at the network side may perform steps 101-105 shown inFIG. 2.

According to the manner for implementing the video processing device,hardware resources for implementing the video processing device mayinclude computation resources such as a processor and a memory andcommunications resources such as a network interface. The videoprocessing device may also be implemented as an executable instruction,including a computer executable instruction such as a program and amodule, stored in a storage medium.

As stated above, when the video processing device is implemented basedon the hardware resources in the terminal at the user side, referring toa schematic view of a software and hardware structure of the videoprocessing device 10 shown in FIG. 4, the video processing device 10 mayinclude a hardware layer, a driver layer, an operating system layer, andan application layer. However, a person skilled in the art shouldunderstand that, the structure of the video processing device 10 shownin FIG. 4 is only exemplary, and does not limit the structure of thevideo processing device 10. For example, more components than those inFIG. 4 may be configured for the video processing device 10 according toimplementation demand, or some components may be omitted according toimplementation demand.

The hardware layer of the video processing device 10 may includeprocessor 11, an input/output interface 13, a storage medium 14, and anetwork interface 12. The components may be connected to communicatethrough a system bus.

The processor 11 may be implemented as a Central Processing Unit (CPU),a Microcontroller Unit (MCU), an Application Specific Integrated Circuit(ASIC) or a Field-Programmable Gate Array (FPGA).

The input/output interface 13 may be implemented as an input/outputdevice such as a display screen, a touch screen, and a speaker.

The storage medium 14 may be implemented as a non-volatile storagemedium such as a flash disk, a hard disk, and an optical disk, and mayalso be implemented as a volatile storage medium such as Double DataRate (DDR) dynamic cache. The storage medium 14 stores executableinstructions for performing the video processing method.

For example, the storage medium 14 may be disposed integrally with othercomponents of the video processing device 10, or disposed separatelyrelative to other components of the video processing device 10. Thenetwork interface 12 may provide the processor 11 with access ability ofexternal data such as a storage medium 14 set in a different place. Forexample, the network interface 12 may be based on short-rangecommunications performed according to Near Field Communication (NFC)technology, Bluetooth technology, and ZigBee technology. In addition,communications in communications modes such as CDMA and WCDMA andevolved modes thereof may also be implemented.

The driver layer includes middleware 15 that is used for the operatingsystem 16 to identify a hardware layer and communicate with eachcomponent of the hardware layer, for example, may be a collection ofdriving programs for each component of the hardware layer.

The operating system 16 is configured to provide a user-oriented graphicinterface, which may include a plug-in icon, a desktop background, andan application icon. The operating system 16 supports a user controllinga device through the graphic interface. The embodiments of the presentdisclosure do not limit the software environment of the device such as atype and a version of the operating system, for example, the operatingsystem may be a Linux operating system, a UNIX operating system, andanother operating system.

The application layer includes an application running on a terminal at auser side. As stated above, when it is necessary to realize a functionof sharing a recorded video on a social network platform, a socialnetwork application 17 runs in the application layer.

For example, the video processing device is implemented on a terminal ata user side. The video processing method shown in FIG. 2 is applied inthe following scene: a user sets a time period for forming a dynamicspecial effect in a video (for example, displaying a dynamic specialeffect from the fifth minute to the sixth minute of the video) and setsa position forming the dynamic special effect in a video frame (imageframe) (for example, displaying the dynamic special effect in the centerof the video frame).

Referring to the optional schematic flowchart of the video processingmethod shown in FIG. 5A, the video processing method according to anembodiment of the present disclosure can be used to process a videocollected by a terminal in real time.

Step 201 a: A terminal at a user side may collect a video and presentscollected image frames on a graphic interface in sequence.

For example, the method may be applicable to a scene that a user recordsa video of an environment. When the terminal at the user side operates aclient of a social network platform, a function of recording and sharingis triggered, a rear camera of the terminal is selected from the graphicinterface to record a video of the environment, and collected imageframes are presented on the graphic interface of the screen of theterminal in sequence.

Furthermore, for example, the method may be applicable to a scene that auser takes a selfie. When the terminal at the user side operates aclient of a social network platform, a function of taking and sharing aselfie is triggered, a front camera of the terminal is selected from thegraphic interface to record a video of a user and an environment wherethe user is located, and collected image frames are presented on thegraphic interface of the screen of the terminal in sequence.

The video processing method according to the embodiment of the presentdisclosure may be further used to add a dynamic special effect to avideo (file) stored in the terminal locally in advance, for example,process a video collected by the terminal in advance and a videoreceived from a network side or other terminals.

Step 201 b: The terminal at the user side may decode the video andpresents image frames in the video on the graphic interface in sequence.

It can be understood that, steps 201 a and 201 b are steps performedaccording to the type of the video data, i.e., whether the video iscollected in real time or stored in advance.

Step 202 a : Determine a dynamic special effect, which can also bereferred to as a to-be-added special effect, that is set by a user andis to be added to the video.

In one embodiment, when the terminal at the user side presents videoframes in a video on the graphic interface, the terminal may presentvirtual identifiers of candidate dynamic special effects that may beadded to a current video, for example, present serial numbers, titles,or thumbnails of candidate dynamic special effects on the graphicinterface, and determine a dynamic special effect that needs to be addedaccording to a virtual identifier triggered by the user.

In another embodiment, when the terminal at the user side presents videoframes in a video on the graphic interface, the terminal may present avirtual switch of a dynamic special effect that may be formed in thecurrent video, for example, present titles or thumbnails of dynamicspecial effects on the graphic interface. When the user triggers avirtual identifier, a default dynamic special effect that is set inadvance is determined.

Step 202 b : Determine a position of a to-be-added dynamic specialeffect set in the video by the user.

In one embodiment, a position set by the user in the currently presentedimage frame is identified. The identified position is used as a positionwhere a dynamic special effect is added.

For example, a specific touch gesture (e.g., a three-point touch controland double click) is preset and used as a triggering operation forpresenting a dynamic special effect in a frame image, when the operationimplemented by the user is detected in the frame image presented on thegraphic interface, the detected position of the corresponding operationis used as a position where the dynamic special effect needs to beadded. For example, when the area of the dynamic special effect islarge, the position may be used as a central position of the dynamicspecial effect. Furthermore, for example, the position may be used as aposition where the dynamic special effect initially occurs when thedynamic special effect begins, or as a position where the dynamicspecial effect occurs in the end when the dynamic special effectdisappears.

Furthermore, for example, when a newly collected image frame isdisplayed on the graphic interface, or an image frame newly decoded fromthe video is displayed, a virtual identifier of the dynamic specialeffect on the graphic interface that is dragged by the user and theposition in the image frame where the virtual identifier is released areidentified. The identified position is used as a position of the dynamicspecial effect that needs to be added to the video. For example, as acentral position for forming the dynamic special effect, or a startingposition or an ending position for forming the dynamic special effect.

In another embodiment, an operation trace of a user in a video istracked and identified. A position in each image frame through which theoperation trace of the user passes is determined as a position in acorresponding image frame where a dynamic special effect is added.

For example, when a collected image frame or an image frame decoded fromthe video is displayed on a graphic interface, a contact between afinger tip of the user and the graphic interface is detected, and amoving trace of the contact is identified. If the contact is at position1 in an image frame 1, at position 2 in an image frame 2, and so on, atposition n in an image frame n, a continuous moving trace is formed frompositions 1 to n, and furthermore, the position i of the image frame i(1≤i≤n) is a position for adding the dynamic special effect.

Step 202 c : Determine a time period in the video that is set by theuser and during which the dynamic special effect is being added.

The time period for the dynamic special effect refers to a time periodon a time axis of the video corresponding to a life cycle of the dynamicspecial effect when the dynamic special effect is added to the video.

In one embodiment, the dynamic special effect set by the user may have apredetermined life cycle (for example, 10 seconds, that is, the dynamicspecial effect disappears in 10 seconds), and correspondingly, timingstarts when detecting the user triggers an operation of forming thedynamic special effect till the time period the life cycle reaches isused as the time period in the video during which the dynamic specialeffect needs to be added.

For example, when the foregoing specific touch gesture is detected orthe operation of dragging the virtual identifier of the dynamic specialeffect and releasing the virtual identifier at a certain position in theimage frame is detected, timing starts for the life cycle of the dynamicspecial effect till the life cycle reaches the time period. The dynamicspecial effect set by the user is added at the same position (that is,the position of the to-be-added dynamic special effect determined instep 202 c ) of the image frames during the time period.

In another embodiment, an operation trace of a user in a video istracked and identified. A dynamic special effect is formed around theoperation race of the user, and accordingly, the time period for addingthe dynamic special effect is a time period from detecting the operationof the user to releasing the user operation during a video playingprocess.

For example, when a collected image frame or an image frame decoded fromthe video is displayed on a graphic interface, a contact between afinger tip of a user and the graphic interface is detected, the time ofidentifying the contact (it is assumed that the video has been played tothe fifth minute) and the time of identifying releasing of the contact(it is assumed that the video has been played to the sixth minute) aredetermined. The playing time period from the fifth minute to the sixthminute in the video is a time period during which a dynamic specialeffect needs to be added.

It is apparent that, when the time period of the dynamic special effectis determined, image frames in the time period can be determined astarget image frames for carrying the dynamic special effect according tothe time axis of the video. For example, as stated in the foregoingexample, the image frames corresponding to the fifth minute to the sixthminute in the video are used to carry the dynamic special effect.

It can be understood that, the processes of determining a to-be-addeddynamic special effect and determining a corresponding position and timeperiod in steps 202 a to 202 c are in a random sequence. The foregoingsequence of describing the steps should not be deemed as limitation onthe sequence of performing steps 202 a to 202 c.

Step 203: Determine an attribute and coordinates of a special effectelement that needs to be formed in each target image frame when thedynamic special effect set by the user is added to the video.

In one embodiment, according to the to-be-added dynamic special effectof the video, a visual effect of each target image frame is determinedwhen the to-be-added dynamic special effect is carried by target imageframes, the visual effect is a “snapshot” for the attributes (such as aquantity of special effect elements, initial speed, gravitationalacceleration speed, centripetal force, centrifugal force, tangentialacceleration speed, autorotation speed, autorotation acceleration speed,initial size, ending size, initial color, ending color, color mixingmethod, life cycle, and life cycle) for forming the dynamic specialeffect in different stages, analysis is performed based on the visualeffects. Static attributes (such as a quantity, a size, and a color ofspecial effect elements) of the special effect element that needs to beformed by rendering in a corresponding target image frame and positionsof the special effect elements in the target image frame are determinedwhen each of the target image frames forms a corresponding visualeffect.

For example, as shown in FIG. 5B, a method for mapping visual effectattributes of the dynamic special effect in different stages (includingstages 1-5) to each target image frame (target image frames 1-n) is usedto compute an attribute and a position of a special effect element. Thespecial effect element is formed by rendering the element when acorresponding visual effect is formed in each target image frame.

Step 204: Render the special effect element on a drawing interface basedon the attribute and the coordinates of the special effect element.

In one embodiment, for each target image frame, based on the positionand the corresponding attribute of the special effect element computedfor the corresponding target image frame, a blank drawing interface witha black background (the size of the drawing interface is consistent withthe size of the image frame) needs to have the position of thecoordinates of the special effect element. The special effect element isrendered according to the attribute of the special effect element at theposition obtained through computation, to form the special effectelement with the corresponding attribute.

For example, as shown in FIG. 5C, stage 1 of the dynamic special effectis mapped to target image frame 1. An attribute and a position of aspecial effect element that needs to be formed in the target image frame1 is calculated according to stage 1. At a position on the blank drawinginterface corresponding to the special effect element, a correspondingposition is selected to form the special effect element with thecorresponding attribute according to the attribute of the special effectelement at each position obtained through computation, thereby obtaininga drawing interface that may be combined with the target image frame 1.

It can be understood that, it is necessary to render a special effectelement that should exist in a corresponding target image frame on theblank drawing interface for each target image frame. Therefore, after aspecial effect element corresponding to a target image frame is renderedon the blank drawing interface, if a special effect elementcorresponding to another image frame further needs to be rendered, thedrawing interface need to be cleared.

For example, as shown in FIG. 5C, after the special effect elementcorresponding to target image frame 1 is formed by rendering on thedrawing interface, if a special effect element corresponding to targetimage frame 2 further needs to be formed, the drawing interface need tobe cleared. At a position of the blank drawing interface correspondingto a special effect element of target image frame 2, according to anattribute of a special effect element at each position obtained throughcomputation, the corresponding position is selected to form a specialeffect element with a corresponding attribute, thereby obtaining adrawing interface that may be combined with target image frame 2.

In another embodiment, when a size of a target image frame isinconsistent with a size of a drawing interface, coordinates of aspecial effect element needs to be normalized based on the size of thetarget image frame to form a normalized coordinate. A position on ablank drawing interface with a black background corresponding to thenormalized coordinate of the special effect element is rendered to forma special effect element with a corresponding attribute. This wouldavoid the problem that a position of a special effect element formed byrendering and a position that is set by a user in a video and used forforming a dynamic special effect are inconsistent, and ensure theprecision of forming a position of a dynamic special effect in a video.

Step 205: Fill the target image frames into the drawing interface as abackground of the drawing interface and forming drawing interface frameswith the dynamic special effect.

Step 206: Output the drawing interface frames that are formedcorrespondingly for each of the target image frames.

In one embodiment, as shown in FIG. 5, target image frame 1, as abackground, is filled into a drawing interface. The drawing interfaceframe is formed by rendering target image frame 1 with the specialeffect element. The same method may be used to form drawing interfaceframes 2-n.

In some embodiments, a terminal at a user side outputs a drawinginterface frame in real time, so that the user may view a dynamicspecial effect set in a video in time. The video being viewed may be apre-stored video or a video created in real time by the user.

In one embodiment, the following step is performed.

Step 207: Perform video encoding on a non-target image frame in thevideo and each of the drawing interface frames that are outputted in atime sequence to form a video file with the dynamic special effect.

For example, as shown in FIG. 5D, video encoding is performed on targetimage frame 1, drawing interface frames 1 and 2. Non-target image frame2 in sequence to form a video file with user settings that is to beencoded and played at the terminal at the user side locally, or sharedon a social network platform to be accessed by other users. Since thedynamic special effect has been carried in drawing interface frames 1-n,when the video file is played, a dynamic special effect set by the userat a specific position of a specific video clip may be viewed, so thatthe video clip (and the position of presenting the dynamic specialeffect in the video) can be quickly understood as a part that isemphasized by a video issuer, to realize an effect that a user hopesthat a viewer could pay attention to a specific video clip or a specificposition in a video when sharing the video.

For example, a video processing device is implemented on a terminal at auser side. The following describes that the video processing methodshown in FIG. 2 is applied in the following scene: a user implements aspecific action in a video and a trace of the specific action is trackedto add a dynamic special effect corresponding to the trace to the videoautomatically.

Referring to the optional schematic flowchart of the video processingmethod shown in FIG. 6, the video processing method according to anembodiment of the present disclosure may be used to process a videocollected by a terminal in real time, and correspondingly, refer to step301 a:

Step 301 a : A terminal at a user side performs video collection andpresents collected image frames on a graphic interface in sequence.

For example, it may be applicable to a scene that a user records a videoof an environment, and furthermore, for example, it may be applicable toa scene that a user takes a selfie.

The video processing method according to an embodiment of the presentdisclosure may further be used to process a video (file) locally storedin a terminal in advance, for example, process a video collected by theterminal in advance and a video received from a network side or otherterminals, and correspondingly, refer to step 302 b:

Step 301 b : The terminal at the user side decodes the video andpresents image frames in the video on the graphic interface in sequence.

It can be understood that, steps 301 a and 301 b are steps performedaccording to a type of the video (e.g., whether the video is collectedin real time or pre-stored).

Step 302: Identify a feature of each image frame in the video, anddetermine image frames identified to have a specific action feature asthe target image frames.

In one embodiment, when collected image frames are played on the graphicinterface or image frames obtained by decoding a video are played on thegraphic interface, a feature is extracted from the image framespresented on the graphic interface, the extracted feature is comparedwith a preset action feature (such as a facial movement and a fingermovement). An image frame with the preset action feature is determinedas a target image frame to which a dynamic special effect needs to beadded.

Step 303: Determine an attribute of a special effect elementcorresponding to each of the target image frames when a dynamic specialeffect following a trace of a specific action is added to the video, anddetermine coordinates of drawing the special effect element on thedrawing interface based on a position of the specific action in each ofthe target image frames.

Step 304: Render on the drawing interface based on the attribute andcoordinate of the special effect element, to form a special effectelement.

Step 305: Fill the target image frames into the drawing interface as abackground of the drawing interface and forming drawing interface frameswith the dynamic special effect.

Step 306: Output the drawing interface frames that are formedcorrespondingly for each of the target image frames.

Implementation details of steps 303-306 may be learned with reference tothose disclosed in steps 204-206 and will not be described additionally.

In one embodiment, the following step may be further performed:

Step 307: Perform video encoding on a non-target image frame in thevideo and each of the drawing interface frames that are outputted in atime sequence to form a video file with the dynamic special effect.

For example, as shown in FIG. 5D, video encoding is performed on targetimage frame 1, drawing interface frames 1 and 2. Non-target image frame2 in sequence to form a video file with user settings that is to beencoded and played at the terminal at the user side locally, or sharedon a social network platform to be accessed by other users.

Since the dynamic special effect has been carried in drawing interfaceframes 1-n, when the video file is played, a dynamic special effectcorresponding to a trace of a specific action may be viewed, so that thespecific action in the video can be quickly understood as a part that isemphasized by a video issuer, to realize an effect that a user hopesthat a viewer could pay attention to the specific action when sharingthe video.

For example, a video processing device is implemented on a terminal at auser side, the following describes that the video processing methodshown in FIG. 2 is applied in the following scene: a dynamic specialeffect tracking an outline of a specific object is added to a video.

Referring to the optional schematic flowchart of the video processingmethod shown in FIG. 7, the video processing method according to anembodiment of the present disclosure may be used to process a videocollected by a terminal in real time.

Step 401 a : A terminal at a user side performs video collection andpresents collected image frames on a graphic interface.

For example, it may be applicable to a scene that a user records a videoof an environment. Furthermore, for example, it may be applicable to ascene that a user takes a selfie.

The video processing method according to an embodiment of the presentdisclosure may further be used to process a video (file) locally storedin a terminal in advance, for example, process a video collected by aterminal in advance and a video received from a network side or otherterminals, and correspondingly, refer to step 401 b :

Step 401 b : The terminal at the user side decodes the video andpresents image frames in the video on the graphic interface.

It can be understood that, steps 401 a and 401 b are steps performedcorrespondingly according to a type of the video (whether the video iscollected in real time or pre-stored).

Step 402: Identify an object of each image frame in the video, anddetermine image frames identified to have a specific object as thetarget image frames.

Step 403: Determine an attribute of a special effect elementcorresponding to each of the target image frames when a dynamic specialeffect following an outline of a specific object in the video is addedto the video, and determine coordinates of drawing the special effectelement on the drawing interface based on a position of the specificobject in each of the target image frames.

Step 404: Render on the drawing interface based on the attribute andcoordinate of the special effect element, to form a special effectelement.

Step 405: Fill the target image frames into the drawing interface as abackground of the drawing interface and forming drawing interface frameswith the dynamic special effect.

Step 406: Output the drawing interface frames that are formedcorrespondingly for each of the target image frames.

In a typical application scene, a terminal at a user side outputs adrawing interface frame in real time, so that the user may view adynamic special effect set in a video (for example, a pre-stored videoor a video that is formed in real time when the terminal at the userside is collecting an environment) on time.

In one embodiment, the following step may be further performed.

Step 407: Perform video encoding on a non-target image frame in thevideo and each of the drawing interface frames that are outputted in atime sequence to form a video file with the dynamic special effect

For example, as shown in FIG. 5D, video encoding is performed on targetimage frame 1, drawing interface frames 1 and 2, and non-target imageframe 2 in sequence to form a video file with user settings that is tobe encoded and played at the terminal at the user side locally, orshared on a social network platform to be accessed by other users

Because the dynamic special effect has been carried in drawing interfaceframes 1-n, when the video file is played, a dynamic special effecttracking the outline of the specific object may be viewed, so that theobject with the dynamic special effect in the video and the movementframe thereof can be quickly understood as a part that is emphasized bya video issuer, to realize an effect that a user hopes that a viewercould pay attention to the specific object when sharing the video.

The following describes an example of constructing a light paintingspecial effect by using a particle system tool. A basic unit for theparticle system tool to construct a light painting special effect isalso referred to as a particle.

Scene 1) is shown in FIGS. 8A and 8B, a user may set a trace of a drawnlight painting special effect at a certain position in an image framecorresponding to a certain time point in a video, that is, the trace ofthe light painting special effect drawn by the user is bound with aspecific position in the video and is also bound with an image framecorresponding to the time point of the video.

In scene 2), a user may select an effect of a different trace of a lightpainting special effect, for example, the effects include the following.

A) As shown in FIG. 8D, a visual appearance of a trace of a lightpainting special effect is different.

B) A disappearance duration of a trace of a light painting specialeffect is different.

C) Particle disappearance animation of a light painting special effectis different, for example:

-   -   i. Disappear gradually.    -   ii. Disappear while changing into circles.    -   iii. Disappear while being vaporized into water vapor.    -   iv. As shown in FIGS. 8C and 8E, extension of trace of a light        painting special effect.

D) As shown in FIG. 8F, animation among multiple particles, for example,a single particle rises, and a particle disappears after explosion, canrealize an effect of finger slipping.

Scene 3): a light painting special effect and a specific action in avideo are identified and combined.

-   -   i. A moving position of a hand of a user in each image frame of        a video may be identified automatically. A light painting        special effect characterizing a moving trace of the hand is        formed at a position of the hand in each image frame.    -   ii. As shown in FIG. 8G, if a user prepares to draw a circle in        the air, a position of a hand of the user in each image frame is        identified automatically. According to a position of an arm of        the user and a start position of the hand of the user in each        image frame, a light painting special effect corresponding to a        moving trace of the hand is formed.

Scene 4): a light painting special effect and a specific object aretracked, identified, and combined.

-   -   i. A trace of a light painting special effect added by a user is        combined with an object in a current video frame of a video. If        the object moves in the following image frame of the video, the        trace of the light painting special effect also moves along with        the object in the video.    -   ii. As shown in FIG. 8H, if the user selects a dog in the        current image frame of the video. The dog moves in a video        collected afterwards. The trace of the light painting special        effect in the following image frame moves with the dog.

Implementation of the light painting special effect is described.Implementation of the light painting special effect mainly includes fourparts, that is, template protocol parsing, input processing, particleeffect rendering, and video synthesizing, which will be describedrespectively with reference to FIGS. 8I and 8J.

I. Template Protocol Parsing

A light painting special effect is essentially formed by repeatedlymapping a single particle element for a large amount of times.

Each particle element is drawn on different positions of a screen withdifferent sizes, colors, and rotation directions, to form a whole lightpainting special effect.

A single particle element may support the following attributes: emissionangle; initial speed (x axis and y axis directions); gravitationalacceleration speed (x axis and y axis directions); centripetalforce/centrifugal force; tangential acceleration speed; autorotationspeed; autorotation acceleration speed; initial size; ending size;initial color; ending color; color mixing method; life cycle; and amaximum quantity of particles.

As shown in FIG. 8I, for an image frame in a video that needs a lightpainting special effect formed, attributes, such as size, color.Rotation direction of a particle (element) that is drawn on a blankcanvas and is used to form the light painting special effect arerequired. Coordinates are computed, and a position of the particle isalso computed. When the light painting special effect is formed in eachimage frame, the coordinates and a position of the particle arecomputed. When a particle corresponding to each image frame is presentedcontinuously in corresponding image frames, the effect of moving theparticle is realized.

II. Input Processing

The principle of implementing a light painting special effect in a videois: moving along with an input coordinate by using a particle emitterprovided by a particle system (a tool provided by the particle systemfor a user to draw a particle), and forming a trace of a light paintingspecial effect along with movement of the coordinates of the particleemitter.

As stated above, input herein may come from several different inputresources:

-   -   1. Position set by a user in a video, for example, a finger        slips on a display interface that presents a video and        coordinates are detected.    -   2. A specific action of a certain character in the video is        input for identification, for example, hand movement in each        image frame of the video is identified to obtain coordinates.    -   3. A position of a certain object in a video is input for        tracking, for example, a small animal in the video is tracked to        obtain coordinates.

Whatever the input source is, it is finally converted into an inputcoordinate (x, y), The coordinates are normalized according to the inputcoordinate (x, y) and a size (w, h) of an input image:

x=x/w;

y=y/h;

The normalized coordinate is then put in a canvas system to be convertedinto a canvas coordinate:

x=x* canvasWidth; y=y* canvasHeight.

Finally, a position of the particle emitter on the canvas is adjustedaccording to the canvas coordinate. A particle is drawn on the canvasthrough the particle emitter.

III. Particle Effect Rendering

An OpenGL image operation interface provided by the particle system ismainly used for rendering, for example, it is assumed that each secondis divided into 30 frames, each frame is processed by the followingsteps: clearing a canvas and loading particle element texture, andloading computed relevant attributes of a particle element, such as avertex coordinate and a color; setting a color mixing mode specified bya template; and invoking a drawing interface to draw particles on thecanvas.

IV. Video Synthesizing

For an image frame in a video that needs a light painting special effectformed, the corresponding image frame is filled into a canvas that hasparticles drawn for a corresponding image frame as a background of thecanvas, to realize an effect of synthesizing the particle of the lightpainting special effect and a corresponding image frame. The synthesizedcanvas frame is encoded and stored as a video file.

The video file may be played at a local terminal at a user side oruploaded to a social network platform to share with other users.

A functional structure of the foregoing video processing device isdescribed, and referring to a schematic view of a functional structureof the video processing device 20 in FIG. 9, the video processing device20 includes: a first determining portion 21, configured to determinetarget image frames corresponding to a to-be-added dynamic specialeffect in a video; a second determining portion 22, configured todetermine an attribute of a special effect element corresponding to thedynamic special effect in each of the target image frames andcoordinates of the special effect element; a rendering portion 23,configured to render on a drawing interface based on the attribute andthe coordinates of the special effect element, to form the specialeffect element; a synthesizing portion 24, configured to fill the targetimage frames into the drawing interface as a background of the drawinginterface and forming drawing interface frames with the dynamic specialeffect; and an outputting portion 25, configured to output the drawinginterface frames that are formed correspondingly for each of the targetimage frames.

In one embodiment, the first determining portion 21 is furtherconfigured to determine, based on a time period on a time axis of thevideo corresponding to a user operation, image frames corresponding tothe time period in the video as the target image frame.

In one embodiment, the first determining portion 21 is furtherconfigured to identify a feature of each image frame in the video, anddetermine image frames identified to have a specific action feature asthe target image frames.

In one embodiment, the first determining portion 21 is furtherconfigured to identify an object of each image frame in the video, anddetermine image frames identified to have a specific object as thetarget image frames.

In one embodiment, the second determining portion 22 is furtherconfigured to determine an attribute of a special effect elementcorresponding to each of the target image frames when a dynamic specialeffect following a trace of a touch operation of the user is added tothe video, and determine coordinates of drawing the special effectelement on the drawing interface based on a position of the touchoperation of the user in the video.

In one embodiment, the second determining portion 22 is furtherconfigured to determine an attribute of a special effect elementcorresponding to each of the target image frames when a dynamic specialeffect following a trace of a specific action is added to the video, anddetermine coordinates of drawing the special effect element on thedrawing interface based on a position of the specific action in each ofthe target image frames.

In one embodiment, the second determining portion 22 is furtherconfigured to determine an attribute of a special effect elementcorresponding to each of the target image frames when a dynamic specialeffect following an outline of a specific object is added to the video,and determine coordinates of drawing the special effect element on thedrawing interface based on a position of the specific object in each ofthe target image frames.

In one embodiment, the second determining portion 22 is furtherconfigured to determine a visual effect correspondingly formed in eachof the target image frames based on the dynamic special effect, anddetermine a special effect element that needs to be formed by renderingin a corresponding target image frame and a corresponding attribute whena corresponding visual effect is formed in each of the target imageframes.

In one embodiment, the rendering portion 23 is further configured tonormalize the coordinates of the special effect element based on a sizeof the target image frames, to form a normalized coordinate and render aposition corresponding to the normalized coordinate of the specialeffect element on a blank drawing interface with a black background, toform the special effect element with a corresponding attribute.

In one embodiment, the synthesizing portion 24 is further configured toperform video encoding on a non-target image frame in the video and eachof the drawing interface frames that are outputted in a time sequence toform a video file with the dynamic special effect.

An embodiment of the present disclosure further provides a videoprocessing device, including: a processor and a memory for storing acomputer program that can run in the processor.

The processor is configured to perform following steps when executingthe computer program: determining target image frames corresponding to ato-be-added dynamic special effect in a video; determining an attributeof a special effect element corresponding to the dynamic special effectin each of the target image frames and coordinates of the special effectelement; rendering the special effect element on a drawing interfacebased on the attribute and the coordinates of the special effectelement; filling the target image frames into the drawing interface as abackground of the drawing interface and forming drawing interface frameswith the dynamic special effect; and outputting the drawing interfaceframes that are formed correspondingly for each of the target imageframes.

The processor is further configured to perform the following step whenexecuting the computer program: determining, based on a time period on atime axis of the video corresponding to a user operation, image framescorresponding to the time period in the video as the target image frame.

The processor is further configured to perform following steps whenexecuting the computer program: identifying a feature of each imageframe in the video, and determining image frames identified to have aspecific action feature as the target image frames.

The processor is further configured to perform following steps whenexecuting the computer program: identifying an object of each imageframe in the video, and determining image frames identified to have aspecific object as the target image frames.

The processor is further configured to perform following steps whenexecuting the computer program: determining an attribute of a specialeffect element corresponding to each of the target image frames when adynamic special effect following a trace of a touch operation of theuser is added to the video, and determining coordinates of drawing thespecial effect element on the drawing interface based on a position ofthe touch operation of the user in the video.

The processor is further configured to perform following steps whenexecuting the computer program: determining an attribute of a specialeffect element corresponding to each of the target image frames when adynamic special effect following a trace of a specific action is addedto the video, and determining coordinates of drawing the special effectelement on the drawing interface based on a position of the specificaction in each of the target image frames.

The processor is further configured to perform following steps whenexecuting the computer program: determining an attribute of a specialeffect element corresponding to each of the target image frames when adynamic special effect following an outline of a specific object isadded to the video, and determining coordinates of drawing the specialeffect element on the drawing interface based on a position of thespecific object in each of the target image frames.

The processor is further configured to perform following steps whenexecuting the computer program: determining a visual effectcorrespondingly formed in each of the target image frames based on thedynamic special effect, and determining a special effect element thatneeds to be formed by rendering in a corresponding target image frameand a corresponding attribute when a corresponding visual effect isformed in each of the target image frames.

The processor is further configured to perform following steps whenexecuting the computer program: normalizing the coordinates of thespecial effect element based on a size of the target image frames, toform a normalized coordinate and rendering a position corresponding tothe normalized coordinate of the special effect element on a blankdrawing interface with a black background, to form the special effectelement with a corresponding attribute.

The processor is further configured to perform the following step whenexecuting the computer program: performing video encoding on anon-target image frame in the video and each of the drawing interfaceframes that are outputted in a time sequence to form a video file withthe dynamic special effect.

An embodiment of the present disclosure further provides a computerstorage medium, the computer storage medium stores a computer program,and the computer program is configured to perform following steps whenbeing executed by the processor: determining target image framescorresponding to a to-be-added dynamic special effect in a video;determining an attribute of a special effect element corresponding tothe dynamic special effect in each of the target image frames andcoordinates of the special effect element; rendering the special effectelement on a drawing interface based on the attribute and thecoordinates of the special effect element; filling the target imageframes into the drawing interface as a background of the drawinginterface and forming drawing interface frames with the dynamic specialeffect; and outputting the drawing interface frames that are formedcorrespondingly for each of the target image frames.

The computer program is further configured to perform the following stepwhen being executed by the processor: determining, based on a timeperiod on a time axis of the video corresponding to a user operation,image frames corresponding to the time period in the video as the targetimage frame.

The computer program is further configured to perform the following stepwhen being executed by the processor: identifying a feature of eachimage frame in the video, and determining image frames identified tohave a specific action feature as the target image frames.

The computer program is further configured to perform following stepswhen being executed by the processor: identifying an object of eachimage frame in the video, and determining image frames identified tohave a specific object as the target image frames.

The computer program is further configured to perform following stepswhen being executed by the processor: determining an attribute of aspecial effect element corresponding to each of the target image frameswhen a dynamic special effect following a trace of a touch operation ofthe user is added to the video, and determining coordinates of drawingthe special effect element on the drawing interface based on a positionof the touch operation of the user in the video.

The computer program is further configured to perform following stepswhen being executed by the processor: determining an attribute of aspecial effect element corresponding to each of the target image frameswhen a dynamic special effect following a trace of a specific action isadded to the video, and determining coordinates of drawing the specialeffect element on the drawing interface based on a position of thespecific action in each of the target image frames.

The computer program is further configured to perform following stepswhen being executed by the processor: determining an attribute of aspecial effect element corresponding to each of the target image frameswhen a dynamic special effect following an outline of a specific objectis added to the video, and determining coordinates of drawing thespecial effect element on the drawing interface based on a position ofthe specific object in each of the target image frames.

The computer program is further configured to perform following stepswhen being executed by the processor: determining a visual effectcorrespondingly formed in each of the target image frames based on thedynamic special effect, and determining a special effect element thatneeds to be formed by rendering in a corresponding target image frameand a corresponding attribute when a corresponding visual effect isformed in each of the target image frames.

The computer program is further configured to perform following stepswhen being executed by the processor: normalizing the coordinates of thespecial effect element based on a size of the target image frames, toform a normalized coordinate, and rendering a position corresponding tothe normalized coordinate of the special effect element on a blankdrawing interface with a black background, to form the special effectelement with a corresponding attribute.

The computer program is further configured to perform the following stepwhen being executed by the processor: performing video encoding on anon-target image frame in the video and each of the drawing interfaceframes that are outputted in a time sequence to form a video file withthe dynamic special effect.

In view of the above, the embodiments of the present disclosure havemany beneficial effects.

Embodiments consistent with the present disclosure deliver the effect ofcombining time, a position, and a dynamic special effect such as a lightpainting special effect in a video. The dynamic special element isrealized at a specific position of each image frame of a specific clipof the video when the video is played to the specific clip, so that aviewer of the video may pay attention to the specific clip of the videoand the specific position in the video clip.

Embodiments consistent with the present disclosure deliver the effect ofcombining action identification and a dynamic special effect such as alight painting special effect. The dynamic special effect is formed byfollowing a trace of a specific action, so that a viewer of the videomay pay attention to the specific action in the video.

Embodiments consistent with the present disclosure deliver the effect ofcombining an object (for example, an article) tracking and a dynamicspecial effect such as a light painting special effect. The dynamicspecial effect corresponding to an outline of a specific object isformed by following movement of the specific object, so that a viewer ofthe video may pay attention to the specific object in the video.

A person skilled in the art could understand that, all or partial stepsfor implementing the embodiments of the method may be implemented byhardware associated with program instructions, the program may be storedin a computer readable storage medium, when the program is executed, theprogram performs the steps including the embodiments of the method. Thestorage medium includes various media that can store program code, suchas a mobile storage device, a Random Access Memory (RAM), a Read-OnlyMemory (ROM), a magnetic disk or an optical disk.

A portion in the present disclosure may be realized in the form of asoftware functional module or sold or used as an independent product,the portion may also be stored in a computer readable storage medium. Inthe present disclosure, a functional module or a functional portion mayrefer to one or more computer programs stored in one or more computerreadable media. When executed by a processor, the computer programs mayimplement the corresponding functions of the functional module orfunctional portion. Further, a functional module or a functional portionmay include a hardware component and one or more computer programsstored in one or more computer readable media. When executed by aprocessor, the hardware component and the computer programs mayimplement the corresponding functions of the functional module orfunctional portion.

Based on such understanding, the technical solution in the presentdisclosure essentially or the part that makes contributions to therelevant technology may be embodied in the form of a software product,the computer software product is stored in a storage medium and includesseveral instructions for enabling a computer device (that may be apersonal computer, a server or a network device) to perform the whole ora part of the method in each embodiment of the present disclosure. Theforegoing storage medium may be various media that can store programcode, such as a mobile storage device, a RAM, a ROM, a magnetic disk, oran optical disk.

The foregoing descriptions are merely specific embodiments of thepresent disclosure, but do not intend to limit the protection scope ofthe present disclosure. Any change or replacement that could be easilyconceived of by a person skilled in the art within the technical scopeof the disclosure shall fall in the protection scope of the presentdisclosure. Therefore, the protection scope of the present disclosureshall depend on the protection scope of the claims.

INDUSTRIAL APPLICABILITY

Embodiments of the present disclosure includes determining target imageframes corresponding to a to-be-added dynamic special effect in a video;determining an attribute of a special effect element corresponding tothe dynamic special effect in each of the target image frames andcoordinates of the special effect element; rendering the special effectelement on a drawing interface based on the attribute and thecoordinates of the special effect element; filling the target imageframes into the drawing interface as a background of the drawinginterface and forming drawing interface frames with the dynamic specialeffect; and outputting the drawing interface frames that are formedcorrespondingly for each of the target image frames. A method ofdetermining target video frames for which a dynamic special effect needsto be formed in a video is provided to easily determine a video framecorresponding to a clip or a specific object in a video as a targetvideo frame, thereby provide capability to customize a dynamic specialeffect in the video according to demand. For the audience of a video,regardless of a time point of a video at which the video is beingviewed, since the eye-catching duration of a dynamic special effect isfar longer than a static effect formed by a graphic layer drawn in thevideo, embodiments of the present disclosure enhance users ability toidentify a clip or object that needs to be highlighted by the videopresenter, which improves user experience of video sharing.

What is claimed is:
 1. A video processing method, comprising:determining, by a computing device, target image frames corresponding toa dynamic special effect in a video; determining, by the computingdevice, an attribute of a special effect element corresponding to thedynamic special effect in each of the target image frames andcoordinates of the special effect element; rendering, by the computingdevice, the special effect element on a drawing interface based on theattribute and the coordinates of the special effect element; filling, bythe computing device, the target image frames into the drawing interfaceas a background and forming drawing interface frames with the dynamicspecial effect; and outputting, by the computing device, the drawinginterface frames corresponding to each of the target image frames. 2.The method according to claim 1, further comprising: determining, by thecomputing device based on a time period of the video corresponding to anoperation, image frames corresponding to the time period in the video asthe target image frames.
 3. The method according to claim 1, furthercomprising: identifying, by the computing device, a feature of eachimage frame in the video; and determining, by the computing device,image frames identified as having the feature as the target imageframes.
 4. The method according to claim 1, further comprising:identifying, by the computing device, an object of each image frame inthe video; and determining, by the computing device, image framesidentified as having the object as the target image frames.
 5. Themethod according to claim 1, further comprising: determining, by thecomputing device, an attribute of a special effect element correspondingto each of the target image frames when a dynamic special effectfollowing a trace of a touch operation is added to the video; anddetermining, by the computing device, coordinates for drawing thespecial effect element on the drawing interface based on a position ofthe touch operation in the video.
 6. The method according to claim 1,further comprising: determining, by the computing device, an attributeof a special effect element corresponding to each of the target imageframes when a dynamic special effect following a trace of a specificaction is added to the video; and determining, by the computing device,coordinates of drawing the special effect element on the drawinginterface based on a position of the specific action in each of thetarget image frames.
 7. The method according to claim 1, furthercomprising: determining, by the computing device, an attribute of aspecial effect element corresponding to each of the target image frameswhen a dynamic special effect following an outline of a specific objectis added to the video; and determining, by the computing device,coordinates of drawing the special effect element on the drawinginterface based on a position of the specific object in each of thetarget image frames.
 8. The method according to claim 1, furthercomprising: determining, by the computing device, a visual effectcreated in each of the target image frames based on the dynamic specialeffect; and determining, by the computing device, a special effectelement that needs to be formed by rendering in a corresponding targetimage frame and a corresponding attribute when a corresponding visualeffect is created in each of the target image frames.
 9. The methodaccording to claim 1, further comprising: normalizing, by the computingdevice, the coordinates of the special effect element based on a size ofthe target image frames; and rendering, by the computing device, aposition corresponding to a normalized coordinate of the special effectelement on a blank drawing interface with a black background, to createthe special effect element with a corresponding attribute.
 10. Themethod according to claim 1, further comprising: performing, by thecomputing device, video encoding on a non-target image frame in thevideo and each of the drawing interface frames that are outputted in atime sequence to form a video file with the dynamic special effect. 11.A video processing device, comprising: a memory; and a processor coupledto the memory and configured to: determine target image framescorresponding to a dynamic special effect in a video; determine anattribute of a special effect element corresponding to the dynamicspecial effect in each of the target image frames and coordinates of thespecial effect element; render on a drawing interface based on theattribute and the coordinates of the special effect element to createthe special effect element; fill the target image frames into thedrawing interface as a background of the drawing interface and creatingdrawing interface frames with the dynamic special effect; and output thedrawing interface frames corresponding to each of the target imageframes.
 12. The video processing device according to claim 11, whereinthe processor is further configured to determine, based on a time periodof the video corresponding to an operation, image frames correspondingto the time period in the video as the target image frames.
 13. Thevideo processing device according to claim 11, wherein the processor isfurther configured to identify a feature of each image frame in thevideo, and determine image frames identified to have the feature as thetarget image frames.
 14. The video processing device according to claim11, wherein the processor is further configured to identify an object ofeach image frame in the video, and determine image frames identified ashaving the object as the target image frames.
 15. The video processingdevice according to claim 11, wherein the processor is furtherconfigured to determine an attribute of a special effect elementcorresponding to each of the target image frames when a dynamic specialeffect following a trace of a touch operation is added to the video, anddetermine coordinates of drawing the special effect element on thedrawing interface based on a position of the touch operation of a userin the video.
 16. The video processing device according to claim 11,wherein the processor is further configured to determine an attribute ofa special effect element corresponding to each of the target imageframes when a dynamic special effect following a trace of a specificaction is added to the video, and determine coordinates of drawing thespecial effect element on the drawing interface based on a position ofthe specific action in each of the target image frames.
 17. The videoprocessing device according to claim 11, wherein the processor isfurther configured to determine an attribute of a special effect elementcorresponding to each of the target image frames when a dynamic specialeffect following an outline of a specific object is added to the video,and determine coordinates of drawing the special effect element on thedrawing interface based on a position of the specific object in each ofthe target image frames.
 18. The video processing device according toclaim 11, wherein the processor is further configured to determine avisual effect correspondingly formed in each of the target image framesbased on the dynamic special effect, and determine a special effectelement that needs to be created by rendering in a corresponding targetimage frame and a corresponding attribute when a corresponding visualeffect is formed in each of the target image frames.
 19. The videoprocessing device according to claim 11, wherein the processor isfurther configured to normalize the coordinates of the special effectelement based on a size of the target image frames; and render aposition corresponding to the normalized coordinates of the specialeffect element on a blank drawing interface with a black background tocreate the special effect element with a corresponding attribute.
 20. Anon-transitory computer-readable storage medium storing computer programinstructions executable by at least one processor to perform:determining target image frames corresponding to a dynamic specialeffect in a video; determining an attribute of a special effect elementcorresponding to the dynamic special effect in each of the target imageframes and coordinates of the special effect element; rendering thespecial effect element on a drawing interface based on the attribute andthe coordinates of the special effect element; filling the target imageframes into the drawing interface as a background and forming drawinginterface frames with the dynamic special effect; and outputting thedrawing interface frames corresponding to each of the target imageframes.